#include <string.h>
#include <iostream>
using namespace std;

class Point{
public:
    Point(int ix, int iy):
    _ix(ix), _iy(iy){}

    // 拷贝构造
    Point(const Point &rhs):
    _ix(rhs._ix), _iy(rhs._iy){
        cout << "copy construct" << endl;
    }


    void toString(){   
        cout << _ix << " " << _iy << endl; 
    }
    ~Point(){
        cout << "析构" << endl;
    }
private:
    int _ix;
    int _iy;
};

void test0( ){
    Point pt1(1, 2);
    Point pt2 = pt1;
    pt2.toString();
}



int main(void){
    test0();
}